<!--
 * @Author: zqx me_zqx@163.com
 * @Date: 2025-07-11 20:01:53
 * @LastEditors: zqx me_zqx@163.com
 * @LastEditTime: 2025-09-16 16:29:45
 * @FilePath: /XMate-h5/src/views/minutes/components/labelOverview/SpeechOverviewTable.vue
 * @Description: 
 * 
 * Copyright (c) 2025 by ${git_name_email}, All Rights Reserved. 
-->
<template>
  <table class="min-w-full bg-white overflow-hidden">
    <thead>
      <tr class="h-[50px]">
        <th class="bg-gray-100 text-left px-6 py-3 text-sm font-medium text-gray-700">
          发言人
        </th>
        <th class="bg-gray-100 text-left px-6 py-3 text-sm font-medium text-gray-700">
          角色
        </th>
      </tr>
    </thead>
    <tbody>
      <tr
        v-for="(item, index) of speechOverviewDatas"
        :key="index"
        class="border-b last:border-b-0 h-[50px]"
      >
        <td class="px-6 py-3 text-sm text-gray-900 align-middle">{{ item.name }}</td>
        <td class="px-6 py-3 text-sm text-gray-900 align-middle">
          {{ role(item.type) }}
        </td>
      </tr>
    </tbody>
  </table>
</template>

<script setup lang="ts">
import { PropType } from "vue";
import { SpeechOverview, SpeechOverviewType } from "@/types";

const props = defineProps({
  speechOverviewDatas: {
    type: Array as PropType<SpeechOverview[]>,
    required: true,
  },
});

const role = (type: SpeechOverviewType) => {
  if (type === SpeechOverviewType.CUSTOMER_ROLE) {
    return "客户角色";
  } else if (type === SpeechOverviewType.INTERNAL_PARTNER) {
    return "内部伙伴";
  } else {
    return "--";
  }
};
</script>
